function [y,t] = generate_fsk(length, change_pos, sample_freq, first_freq, second_freq)

% function [y,t] = generate_fsk(length, change_point_position, sample freq, first_freq, second_freq)
% Generates a single changepoint toy dataset. Units are in Hz. T is a time
% index.

y = zeros(length,1);
t = zeros(length,1);

for i = 1:change_pos
	y(i) = sin((first_freq/sample_freq)*2*pi*i);
    t(i) = i/sample_freq;
end

for j = change_pos+1:length
	y(j) = sin((second_freq/sample_freq)*2*pi*j);
    t(j) = j/sample_freq;
end